package controller.command;

import model.displayer.ShapeDisplayer;

public class ShapeMoveCmd extends CommandJFxImpl
{
    double x,y;

    ShapeMoveCmd(ShapeDisplayer shape,double x,double y)
    {
        super(shape);
        this.x = x;
        this.y = y;
    }

    @Override
    public void execute()
    {
        shape.move(x,y);
    }

    @Override
    public void cancel()
    {
        shape.move(-x,-y);
    }
}
